<insert><name>main_functions</name></insert><!--POST

  //---------------------------------------------------//
 //--------- Define Initial Variables ----------//
//--------------------------------------------------//

var msgVersion = user.attr("msgVersion");
var firstName       = initCap(user.attr ("firstName"), "Valued Customer");
var eMail = user.attr("eMail");
var uid             = user.attr("id").toString();
var segment         = uid.substr(uid.length - 2);
var mmid = masterinfo.getID();
var mailingProgram;
var listsource;
var omniture;
var mailingProgram  = user.attr("mailingProgram");

var jobnum = "hpn_1460";     //JOB NUMBER : VERIFY AS THIS VALUE IS INSERTED INTO LINKS.
var showOffers = "false";     //Set to true if this is a sale message
var isPhone = false;         //Replaces the "Clearance" button with a "Phone" button, this is for PALM messages
var phone = "1-866-433-2028"; 
var audience = "";       //Displays the audience that recieves
var facePage = "Hphome";     //The FacePage is the facebook page to link to.  "Hphome" is the standard.
var twitterPage = "hpdeals";     //The twitterPage is the twitter page to link to.  "hpdirect" is the standard.

//The leverage is a Shopping (HHOS) Message that goes to an HPN Newsgram Audience
//There are some difference from the regular shopping message, so set this variable to true for leverage
var leverage = false;
var commercial = false;

  //---------------------------------------------------//
 //------ END Define Initial Variables ------//
//--------------------------------------------------//


  //--------------------------------------------------//
 //--------- Define Message Type ----------//
//--------------------------------------------------//

// Define what type of message this is, Can be
//hhos
//microbiz
//hpn

var messageType = "hhos";


  //------------------------------------------------------//
 //-------- END Define Message Type --------//
//------------------------------------------------------//

POST--><insert><name>message_vars</name></insert><!--POST



/************************************************************************
HPN BACKGROUNDS
************************************************************************/

// BACKGROUND COLOR FOR BODY OF MESSAGE
var bodyBG = "#eaeaea";
// BACKGROUND COLOR FOR LINKS BLOCK IN FOOTER
var linksBG = "#000000";
// LINK TEXT COLOR FOR LINKS BLOCK IN FOOTER
var linksFont = "#FFFFFF";


/************************************************************************
AOIDs
************************************************************************/

var aoid;
var store_name;
//define Job Number
var jobnum = "hpn_1460";
var imageVal = "";  //This is appended on each image to load _app or _hpepp, etc
var folder = "gs";  //This is the folder that images are stored in, changes between versions.
var printerVal = "";

if(messageType == "microbiz")
{
	facePage = "hpsmallbusiness";
}

//Settups AOIDs for different versions
if (mailingProgram == "EPP_HP"){
	aoid = "66990";
	imageVal = "_hpepp";
	printerVal = "EPP_00_";
} else if (mailingProgram == "EPP"){
	aoid = "66989";
	imageVal = "_epp";
	printerVal = "EPP_00_";
} else if (mailingProgram == "APP"){
	aoid = "66988";
	imageVal = "_app";
	printerVal = "EPP_00_";
} else if (mailingProgram == "General Store"){
	aoid = "66987";
	printerVal = "";
}

if (mmid == "760005"){  //Commercial
	aoid = "70094";
	var commercial = true;
	imageVal = "";
}

if (mmid == "744903"){  //Leverage
	aoid = "66990";
	leverage = true;
	jobnum = "hpn_1460";
	imageVal = "";
	printerVal = "";
}
   

//Changes phone number if APP(AKA HPA)
var phone = "1-866-433-2028 English/Espaol";
if (mailingProgram == "APP")
    phone = "1-866-433-2029 English/Espaol";
if (messageType == "microbiz"){
    phone = "1-800-608-6947 English/Espaol";
}
if(messageType == "hpn"){
    phone = "1-888-917-8097";
    aoid = "79555";
    }
     
//Define the JumpID
//This adds the Job Number to HHOS and Microbiz URLS, and also the userMail=epp to tiered versions
var jumpID = "";
if(mailingProgram == "EPP_HP" || mailingProgram == "EPP" || mailingProgram == "APP")
    jumpID = jobnum + "&userMail=epp";
 else 
    jumpID = jobnum;
   
if (messageType == "microbiz"){
	if(mailingProgram == "EPP_HP" || mailingProgram == "EPP" || mailingProgram == "APP")
	jumpID = jobnum + "MB" + "&userMail=epp";
	else 
	jumpID = jobnum + "MB";
}
    
if (leverage){
    jumpID = jobnum+"NG";
    audience = "HP Newsgram";
    mailingProgram = "General Store";
    if(messageType != "microbiz")
        phone = "1-888-917-8097 ";
}
/************************************************************************
SUBJECT LINES
************************************************************************/
var textHeadline = "15% Off All Laptop Batteries!";
var subjectLine;

//document.subject(subjectLine);

var alt = "SEE THE GREAT DEALS WAITING FOR YOU AT HP HOME and HOME OFFICE STORE!";

POST--><!--POST if(messageType == "hpn"){ POST-->`audience`
@HTML_PREVIEW_LINK&msgVersion=web
---------------------------------------------------------------

`textHeadline`
http://www.hp.com?aoid=`aoid`&hhosnl=`jobnum`|`mmid`|`urlArg`  

---------------------------------------------------------------<!--POST }else{ POST-->To ensure you receive your HP Home & Home Office Store offers, 
please add news@mail.hpshopping.com to your address book. 
Need help? Visit:
http://h30189.www3.hp.com/add_address.dyn?v=s
---------------------------------------------------------------
If you prefer to view this message in HTML format, please visit: 
@HTML_PREVIEW_LINK&msgVersion=web
---------------------------------------------------------------

`audience`

---------------------------------------------------------------

`textHeadline`
@HTML_PREVIEW_LINK&msgVersion=web 

---------------------------------------------------------------
<!--POST } POST--><insert><name>sub_footer</name></insert>
<insert><name>footer</name></insert>